<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://micronova.com/yuzu" prefix="m"%> 
<%@page import = "com.db4o.ext.ExtObjectContainer" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "java.util.*" %>
<%  SessionFacade sfacade = new SessionFacade(session); %> 

<%  MotiviAccompagnamento bean = null; %>
<% String id = request.getParameter("id"); %>   
<c:if test="${!empty param.id}">
	<%  bean = (MotiviAccompagnamento)sfacade.getById(id); %>	
</c:if>

<c:if test="${empty param.id}">
	<%  bean= new MotiviAccompagnamento() ; %> 
</c:if>

<%  bean.setDescrizione(request.getParameter("descrizione")); %>
<%  session.setAttribute("editMotivoAcc",bean); %>
<c:set var='valid' value='${true}' scope="request" />

<c:if test="${valid}">
	<% sfacade.setFromSession("editMotivoAcc",false); %> 
	<c:redirect url="list.jsp" />
</c:if>

<c:if test="${!valid}">
	<jsp:forward page="list.jsp" />
</c:if>